/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uoc.tdp.pac3.domain;

/**
 * Enumerador per el tipus d'estat de una incidencia.
 * @author Gerard
 */
public enum RequestType {
    
    SOLVED('Y'),
    NOTSOLVED('N');
    
    private Character id;
    
    private RequestType(Character id){
        this.id = id;
    }

    public Character getId() {
        return id;
    }
    
    public static RequestType getTypeFromChar(char id){
        for(RequestType rt : values()){
            if(rt.id.equals(id)){
                return rt;
            }
        }
        throw new IllegalArgumentException("No RequestType for:" + id);
    }
}
